﻿using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace X23.EFCore.Mapping.User
{
    public class UserMapping : Mapping<Model.User.User>
    {
        public override void OtherConfigure(EntityTypeBuilder<Model.User.User> builder)
        {
            //用户表 名称、账号、密码等字段都是20个字符
            builder.Property(x => x.Name).HasMaxLength(20);
            builder.Property(x => x.Account).HasMaxLength(20);
            builder.Property(x => x.Password).HasMaxLength(20);
            builder.Property(x => x.WeChatId).HasMaxLength(50);
        }
    }
}
